import request from '@/config/axios'

// 供求订单日志 VO
export interface SupplyOrderLogVO {
  id: number // 日志主键
  userId: number // 用户编号
  userType: number // 用户类型
  orderId: number // 订单号
  beforeStatus: number // 操作前状态
  afterStatus: number // 操作后状态
  operateType: number // 操作类型
  content: string // 操作内容
}

// 供求订单日志 API
export const SupplyOrderLogApi = {
  // 查询供求订单日志分页
  getSupplyOrderLogPage: async (params: any) => {
    return await request.get({ url: `/wine/supply-order-log/page`, params })
  },

  // 查询供求订单日志详情
  getSupplyOrderLog: async (id: number) => {
    return await request.get({ url: `/wine/supply-order-log/get?id=` + id })
  },

  // 新增供求订单日志
  createSupplyOrderLog: async (data: SupplyOrderLogVO) => {
    return await request.post({ url: `/wine/supply-order-log/create`, data })
  },

  // 修改供求订单日志
  updateSupplyOrderLog: async (data: SupplyOrderLogVO) => {
    return await request.put({ url: `/wine/supply-order-log/update`, data })
  },

  // 删除供求订单日志
  deleteSupplyOrderLog: async (id: number) => {
    return await request.delete({ url: `/wine/supply-order-log/delete?id=` + id })
  },

  // 导出供求订单日志 Excel
  exportSupplyOrderLog: async (params) => {
    return await request.download({ url: `/wine/supply-order-log/export-excel`, params })
  }
}